package com.test.t1;

import com.test.service.UserService;
import com.test.tx.TxConfig;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2018/12/1 9:53
 */
public class IocTest_tx {
    @Test
    public void test01() {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(TxConfig.class);
        UserService userService = context.getBean(UserService.class);
        userService.insertUser();
        context.close();
    }
}
